package stu.ais.HomeWork;

public class EmployeeTest {
    public static void main(String[] args) {
        //1. 创建一个上司
        Employee boss = new Employee(1,"admin",2500.0d);
        boss.setEmployees(new Employee[0]);

        //2. 定义一个下属
        Employee e2 = new Employee(2,"tom",1000.0d);
        Employee e3 = new Employee(3,"admin",1000.0d);
        Employee e4 = new Employee(4,"jack",1600.0d);
        Employee e5 = new Employee(5,"ming",1000.0d);
        Employee e6 = new Employee(6,"mike",1500.0d);

        //3. boss添加e2
        boss.addEmp(e2);
        boss.addEmp(e3);
        boss.addEmp(e4);
        boss.addEmp(e5);
        boss.addEmp(e6);

        //4. 根据下属的id进行删除
         boss.delById(2);

        boss.delByPrice(1300.0d);

        e2.addEmp(boss);
        boss.findAll();
    }
}
